#include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <map>
#include <unordered_map>
#include <vector>
using namespace std;

int findNthDigit( int n ) {

    int digit    = 1;
    int start    = 1;
    int bitCount = 9 * start * digit;

    while ( n > bitCount ) {
        n = n - bitCount;
        digit++;
        start *= 10;
        bitCount = 9 * start * digit;
    }

    long num = std::ceil( ( n * 1.0 ) / digit ) + start - 1;
    int  i   = n % digit;
    i        = i == 0 ? digit - 1 : i - 1;

    // long num = ( n - 1 ) / digit + start;
    // int  i   = ( n - 1 ) % digit;

    return std::to_string( num ).at( i ) - '0';
}

int lengthofLIS( vector< int > nums ) {

    vector< int > topCard( nums.size() );

    int piles = 0;

    for ( size_t i = 0; i < nums.size(); i++ ) {

        int left = 0, right = piles;
        int poker = nums[ i ];

        while ( left < right ) {
            int mid = left + ( right - left ) / 2;

            if ( poker < topCard[ mid ] ) {
                right = mid;
            }
            else if ( poker > topCard[ mid ] ) {
                left = mid + 1;
            }
            else if ( poker == topCard[ mid ] ) {
                right = mid;
            }
        }

        if ( left == piles ) {
            piles++;
        }

        topCard[ left ] = poker;
    }

    return piles;
}

int maxEnvelopes( vector< vector< int > >& envelopes ) {

    std::sort( envelopes.begin(), envelopes.end(),
               []( vector< int >& a, vector< int >& b ) {
                   if ( a[ 0 ] == b[ 0 ] ) {
                       return a[ 1 ] > b[ 1 ];
                   }
                   return a[ 0 ] < b[ 0 ];
               }

    );
    vector< int > height( envelopes.size() );
    for ( size_t i = 0; i < envelopes.size(); i++ ) {
        height[ i ] = envelopes[ i ][ 1 ];
    }
    return lengthofLIS( height );
}

void howManyWays( const vector< vector< int > >& ways ) {

    int n = 3, m = 2, s = 1, t = 3;
    int result = 0;

    vector< vector< int > > dp( n, vector< int >( n + 1, 0 ) );

    for ( int i = 0; i < n; i++ ) {
        dp[ i ][ 0 ] = 0;
        dp[ i ][ 1 ] = ways[ s ][ i ] == 1 ? 1 : 0;
    }

    for ( int i = 2; i <= n; i++ ) {
        for ( int j = 1; i <= n; i++ ) {
            if ( dp[ j ][ i ] == 1 ) {
                result++;
            }
        }
    }

    cout << result;
    return;
}

// 地平线： 找到数量为n的含有不连续的1的比特串
void dfs( string& str, size_t pos ) {

    if ( pos == str.size() ) {
        cout << str << " ";
        return;
    }

    for ( int i = 0; i < 2; i++ ) {
        if ( pos == 0 ) {
            str[ 0 ] = '0' + i;
        }
        else {
            if ( str[ pos - 1 ] == '1' && i == 1 ) {
                break;
            }
            else {
                str[ pos ] = '0' + i;
            }
        }
        dfs( str, pos + 1 );
    }
}

string findMinString( const string& s, const string& p ) {
    // s = "DBCEA";  p = "BCA";
    unordered_map< char, int > target, window;

    int required = p.size(), formed = 0;

    size_t left = 0, right = 0;
    size_t minstart = 0, minLen = INT_MAX;

    for ( int i = 0; i < p.size(); i++ ) {
        target[ p[ i ] ]++;
    }

    while ( right < s.size() ) {
        char c = s[ right ];

        if ( target.count( c ) && window[ c ] < target[ c ] ) {
            window[ c ]++;
            formed++;
        }

        while ( left <= right && formed == required ) {
            if ( right - left + 1 < minLen ) {
                minLen   = right - left + 1;
                minstart = left;
            }
            char leftC = s[ left ];

            window[ leftC ]--;

            if ( target.count( c ) && window[ c ] <= target[ c ] ) {
                formed--;
            }
            left++;
        }
        right++;
    }

    if ( minLen == INT_MAX ) {
        return "";
    }

    return s.substr( minstart, minLen );
}

// 360
int needPeople;
int needX;
int howmanyWays( const vector< int >& nums, int nowPeople, int nowX, size_t pos ) {
    if ( nowPeople > needPeople ) {
        return 0;
    }
    else if ( nowPeople == needPeople ) {
        if ( nowX >= needX ) {
            return 1;
        }
        return 0;
    }
    if ( pos >= nums.size() ) {
        return 0;
    }

    int ifadd  = howmanyWays( nums, nowPeople + 1, nowX + nums[ pos ], pos + 1 );
    int notadd = howmanyWays( nums, nowPeople, nowX, pos + 1 );
    return ifadd + notadd;
}

int main() {

    int T;
    cin >> T;

    for ( int i = 0; i < T; i++ ) {
        int n;
        cin >> n >> needX;
        vector< int > nengli( n, 0 );
        for ( int j = 0; j < n; j++ ) {
            cin >> nengli[ j ];
        }
        needPeople = ceil( n / 2.0 );
        cout << howmanyWays( nengli, 0, 0, 0 ) << endl;
    }
    return 0;
}

// 后端框架和中间件（如缓存、数据库、消息中间件）